package com.yangxin.lesson.web.controller;

import com.yangxin.lesson.vo.request.SwaggerRequestVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.models.Swagger;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/** @Author yangxinxin
 * @Description //TODO
 * @Date 19:45 2020/2/12
 * @Param
 * @return
 **/
@RestController
@RequestMapping("/api")
@Api(tags = "测试Swagger接口")//用在类上，说明该类的作用，可以标记一个controller类作为swagger文档资源
public class SwaggerController {
    @ApiOperation(value = "我的第一个swagger接口！")
    @PostMapping("/swagger")//请求方法
    public SwaggerRequestVo testSwagger(@RequestBody SwaggerRequestVo vo){
        return vo;
    }
}
